package com.dong.controller;

import com.dong.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <h1></h1>
 *
 * @author : dzj
 * @create: 2020-05-05 01:05
 */
@Controller
public class HelloController {
    @Autowired
    private HelloService helloService;

    @ResponseBody
    @GetMapping("/hello")
    public String hello()  {
        return "success"+helloService.sayHello("zhangsan");
    }
    @GetMapping("/suc")
    public String toSuccess() {
        return "success";
    }
}
